<?php
include('../classes/class.Connection.php');
$lastname       = $_POST['last-name'];
$firstname      = $_POST['first-name'];
$middlename     = $_POST['middle-name'];
$gender         = $_POST['gender'];
$address        = $_POST['address'];
$department     = $_POST['department'];
$position       = $_POST['position'];
$auth           = $_POST['auth-level'];
$email          = $_POST['email']."@".$_POST['provider'];
$username       = $_POST['user-name'];

$adduser = new User();
$adduser->lastname = $lastname;
$adduser->firstname = $firstname;
$adduser->middlename = $middlename;
$adduser->gender = $gender;
$adduser->address = $address;
$adduser->department = $department;
$adduser->position = $position;
$adduser->email = $email;
$adduser->auth = $auth;
$adduser->username_adduser = $username;
if($adduser->addUser() == '1 1'){
     echo "<div class='corner-all success padding-all margin-top font12'>Successfully saved!.</div>";
}else{
    echo "<div class='corner-all error padding-all margin-top font12'>Error occured.</div>";
}

?>
